lib_LTLIBRARIES = libcapability.la

ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = -Wall -Werror

library_includedir=$(includedir)/
library_include_HEADERS = libcapability.h

libcapability_la_SOURCES = \
	libcapability.c \
	libcapability_sandbox.c \
	libcapability_sandbox_io.c \
	libcapability_host.c \
	libcapability_host_io.c

libcapability_la_LDFLAGS = -lsbuf

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libcapability.pc


LC_MLINKS = lc_limitfd.3

LCH_MLINKS = \
	lch_autosandbox_isenabled.3	\
	lch_start.3			\
	lch_startfd.3			\
	lch_stop.3			\
	lch_getsock.3			\
	lch_getpid.3			\
	lch_getprocdesc.3		\
	lch_recv.3			\
	lch_recv_rights.3		\
	lch_rpc.3			\
	lch_rpc_rights.3		\
	lch_send.3			\
	lch_send_rights.3

LCS_MLINKS = 				\
	lcs_get.3			\
	lcs_getsock.3			\
	lcs_recv.3			\
	lcs_recv_rights.3		\
	lcs_recvrpc.3			\
	lcs_recvrpc_rights.3		\
	lcs_send.3			\
	lcs_send_rights.3		\
	lcs_sendrpc.3			\
	lcs_sendrpc_rights.3

man3_MANS = \
	libcapability.3 $(LC_MLINKS) \
	libcapability_host.3 $(LCH_MLINKS) \
	libcapability_sandbox.3 $(LCS_MLINKS)

$(LC_MLINKS):  ; ln libcapability.3 $@
$(LCH_MLINKS): ; ln libcapability_host.3 $@
$(LCS_MLINKS): ; ln libcapability_sandbox.3 $@

